package com.ruoyi.merchant.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.merchant.service.IMerchantDataPushCountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.MerchantDataPushCountInfoMapper;
import com.ruoyi.db.domain.MerchantDataPushCountInfo;


/**
 * 商户推送结果统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-18
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class MerchantDataPushCountInfoServiceImpl implements IMerchantDataPushCountInfoService
{
    @Autowired
    private MerchantDataPushCountInfoMapper merchantDataPushCountInfoMapper;

    /**
     * 查询商户推送结果统计
     * 
     * @param id 商户推送结果统计主键
     * @return 商户推送结果统计
     */
    @Override
    public MerchantDataPushCountInfo selectMerchantDataPushCountInfoById(Long id)
    {
        return merchantDataPushCountInfoMapper.selectMerchantDataPushCountInfoById(id);
    }

    /**
     * 查询商户推送结果统计列表
     * 
     * @param merchantDataPushCountInfo 商户推送结果统计
     * @return 商户推送结果统计
     */
    @Override
    public List<MerchantDataPushCountInfo> selectMerchantDataPushCountInfoList(MerchantDataPushCountInfo merchantDataPushCountInfo)
    {
        return merchantDataPushCountInfoMapper.selectMerchantDataPushCountInfoList(merchantDataPushCountInfo);
    }

    /**
     * 查询商户推送结果统计列表
     *
     * @param merchantDataPushCountInfo 商户推送结果统计
     * @return 商户推送结果统计
     */
    @Override
    public List<Map<String, Object>> selectMerchantDataPushCountInfoMapList(MerchantDataPushCountInfo merchantDataPushCountInfo)
    {
        return merchantDataPushCountInfoMapper.selectMerchantDataPushCountInfoMapList(merchantDataPushCountInfo);
    }

    /**
     * 新增商户推送结果统计
     * 
     * @param merchantDataPushCountInfo 商户推送结果统计
     * @return 结果
     */
    @Override
    public int insertMerchantDataPushCountInfo(MerchantDataPushCountInfo merchantDataPushCountInfo)
    {
        merchantDataPushCountInfo.setCreateTime(DateUtils.getNowDate());
        return merchantDataPushCountInfoMapper.insertMerchantDataPushCountInfo(merchantDataPushCountInfo);
    }

    /**
     * 修改商户推送结果统计
     * 
     * @param merchantDataPushCountInfo 商户推送结果统计
     * @return 结果
     */
    @Override
    public int updateMerchantDataPushCountInfo(MerchantDataPushCountInfo merchantDataPushCountInfo)
    {
        merchantDataPushCountInfo.setUpdateTime(DateUtils.getNowDate());
        return merchantDataPushCountInfoMapper.updateMerchantDataPushCountInfo(merchantDataPushCountInfo);
    }

    /**
     * 批量删除商户推送结果统计
     * 
     * @param ids 需要删除的商户推送结果统计主键
     * @return 结果
     */
    @Override
    public int deleteMerchantDataPushCountInfoByIds(Long[] ids)
    {
        return merchantDataPushCountInfoMapper.deleteMerchantDataPushCountInfoByIds(ids);
    }

    /**
     * 删除商户推送结果统计信息
     * 
     * @param id 商户推送结果统计主键
     * @return 结果
     */
    @Override
    public int deleteMerchantDataPushCountInfoById(Long id)
    {
        return merchantDataPushCountInfoMapper.deleteMerchantDataPushCountInfoById(id);
    }
}
